import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { loadIcon } from '@/utils/icon'

const store = createPinia()
// 将插件提供给store实例
store.use(piniaPluginPersistedstate)

const app = createApp(App)

// 加载图标
loadIcon(app)

app.use(ElementPlus, {
    locale: zhCn
})

app.use(store)
app.use(router)
app.mount('#app')